

module.exports = function (app) {
    var wechat = require('../../controllers/weixin/wechat-controller');

    //// wechat access_token
    //app.post('/rest/' + RESTFullServiceVersion + '/wechat/access_token', wechat.accessToken); // body: appid, appsecret
    //// wechat jsapi_ticket
    //app.post('/rest/' + RESTFullServiceVersion + '/wechat/jsapi_ticket', wechat.jsapiTicket); // body: access_token
    // wechat openid
    app.post('/rest/' + RESTFullServiceVersion + '/wechat/openId', wechat.openId); // body: code

    // wechat wxconfig JSON
    app.post('/rest/' + RESTFullServiceVersion + '/wechat/getWxConfig', wechat.getWxConfig); // body: url

    app.post('/rest/' + RESTFullServiceVersion + '/wechat/userProfile', wechat.userProfile); // body: openId

    app.get('/rest/' + RESTFullServiceVersion + '/wechat/getSubscribedUsers', wechat.getSubscribedUsers);  // accepts parameter: next_openid

};